import { RequestBaseData } from '@/types/index'
export interface SendSMSRequestData extends RequestBaseData {
  phoneNumber: string
}

export type SendSMSResponse = ApiResponseData<string>

export interface LoginSMSRequestData {
  phoneNumber: string
  code: string
}
export interface LoginWechatRequestData {
  code: string
}
export interface LoginFormRequestData extends RequestBaseData {
  type: 'WeChat' | 'SMS'
  contextData: LoginSMSRequestData | LoginWechatRequestData
}
export interface LoginFormResponseData extends ApiResponseData<string> {
  token: string
  adcode: string
  level: string
  areaName: string
}
export type LoginFormResponse = LoginFormResponseData

export interface BindWXRequestData {
  openId: string
  channel: 'Service'
  phoneNumber: string
  code: string
}

export type BindWXResponse = ApiResponseData<string>
